<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

<ui:include src="/WEB-INF/includes/head.xhtml">
	<ui:param name="pageTitle" value="Authentication" />
</ui:include>
<h:body>
	<h:panelGroup id="loginPanelContainer" layout="block">
		<p:panel id="loginPanel" header="Railage System Authentication">

			<p:focus context="loginPanel" />

			<h:form id="login_form" class="form-signin">
				<p:panelGrid styleClass="noBorders">
					<p:row>
						<p:column>
							<!-- Error messages -->
							<p:messages id="messages" closable="true" autoUpdate="true" />
						</p:column>
					</p:row>
					<p:row>
						<p:column>
							<p:watermark for="username" value="Username" />
							<h:inputText id="username" label="username"
								value="#{auth.username}" required="true" requiredMessage="Please enter username" />
						</p:column>
					</p:row>
					<p:row>
						<p:column>
							<p:watermark for="password" value="Password" />
							<h:inputSecret id="password" value="#{auth.password}"
								required="true" requiredMessage="Please enter password" />
						</p:column>
					</p:row>
					<p:row>
						<p:column>
							<p:commandButton ajax="false" value="Submit" action="#{auth.login}" />
						</p:column>
					</p:row>
				</p:panelGrid>
			</h:form>
		</p:panel>
	</h:panelGroup>
</h:body>
</html>